home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / ScratchE_v1_1.lha / ScratchE! < prev    next >
Text File  |  1996-11-09  |  14KB  |  498 lines

  1. /*************************************************************************/
  2. /*           ScratchE! v1.1  by Morpheus  (robin@te.xs4all.nl)           */
  3. /*************************************************************************/
  4. options results
  5. /*************************************************************************/
  6. /* chance : the chance to win a game                                     */
  7. /* gain   : the gain-factor                                              */
  8. /*************************************************************************/
  9. chance=5
  10. gain=3
  11. /********************************* Script ********************************/
  12. bbsidentify name
  13. bbsname=result
  14. bbsidentify term
  15. maxlines=word(result,2)
  16. if maxlines<30 then setlength 30
  17. getuser 7
  18. starttijd=result
  19. getuser 42
  20. startbyte=result
  21. getuser 43
  22. startfile=result
  23. sp1='           '
  24. sp2='         '
  25. b.1='ÉÍÍ     ÍÍ»'
  26. b.2='º'
  27. b.3=' '
  28. b.4='º'
  29. b.5='ÈÍÍ     Íͼ'
  30. s.1.1='         '
  31. s.1.2='    1    '
  32. s.1.3='         '
  33. s.2.1='         '
  34. s.2.2='  2   2  '
  35. s.2.3='         '
  36. s.3.1=' 3       '
  37. s.3.2='    3    '
  38. s.3.3='       3 '
  39. s.4.1='  4   4  '
  40. s.4.2='         '
  41. s.4.3='  4   4  '
  42. s.5.1=' 5     5 '
  43. s.5.2='    5    '
  44. s.5.3=' 5     5 '
  45. s.6.1=' 6  6  6 '
  46. s.6.2='         '
  47. s.6.3=' 6  6  6 '
  48. right=50;left=22;top=10;bot=16
  49. call instr
  50. call changegame
  51. quit=0
  52. cg=0
  53. do while quit=0
  54. call init_lot
  55. call draw_lot
  56. call place_bet
  57. if cg=0 then;do
  58. sendstring apos(29,35)||'\k1S C R A T C H\k0'
  59. call get_input
  60. call win_or_lose
  61. end
  62. else cg=0
  63. end
  64. call exitscratche
  65. init_lot:
  66. win=0
  67. i=rnd(chance)
  68. if i=0 then
  69. do
  70. do j=1 for 6
  71. sym.j=0
  72. end
  73. win=1
  74. winsym=rnd(6)+1
  75. j=1
  76. do while j~=4
  77. k=rnd(6)+1
  78. if sym.k=0 then;do
  79. sym.k=winsym
  80. j=j+1
  81. end
  82. end
  83. do j=1 for 6
  84. if sym.j=0 then;do
  85. k=rnd(6)+1
  86. sym.j=k
  87. end
  88. end
  89. end
  90. else
  91. do
  92. tst='0000000000000000'
  93. j=1
  94. do while j~=7
  95. i=rnd(12)+1
  96. if substr(tst,i,1)='0' then
  97. do
  98. tst=overlay('1',tst,i)
  99. if i>6 then i=i-6
  100. sym.j=i
  101. j=j+1
  102. end
  103. end
  104. end
  105. return
  106. draw_lot:
  107. sendstring '\f1\@6\c4\n1'
  108. sendstring center('ÚÄÄÄÄÄ¿ÚÄÄÄÄÄ¿ÚÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄ¿ÚÄÄÄÄÄ¿ÚÄÄÄÄÄ¿ÚÄ¿ ÚÄ¿ÚÄÄÄÄÄ¿ÚÄ¿',80)||'\n1'
  109. sendstring center('³ÿÚÄÄÄÙ³ÿÚÄ¿ÿ³³ÿÚÄÄ¿ÿ³³ÿÚÄÄ¿ÿ³ÀÄ¿ÿÚÄÙ³ÿÚÄ¿ÿ³³ÿ³ ³ÿ³³ÿÚÄÄÄÙ³ÿ³',80)||'\n1'
  110. sendstring center('³ÿÀÄÄÄ¿³ÿ³ ÀÄÙ³ÿÀÄÄÙÿ³³ÿÀÄÄÙÿ³  ³ÿ³  ³ÿ³ ÀÄÙ³ÿÀÄÙÿ³³ÿÀÄ¿  ³ÿ³',80)||'\n1'
  111. sendstring center('ÀÄÄÄ¿ÿ³³ÿ³ ÚÄ¿³ÿÚÄ¿ÿÚÙ³ÿÚÄÄ¿ÿ³  ³ÿ³  ³ÿ³ ÚÄ¿³ÿÚÄ¿ÿ³³ÿÚÄÙ  ÀÄÙ',80)||'\n1'
  112. sendstring center('ÚÄÄÄÙÿ³³ÿÀÄÙÿ³³ÿ³ ³ÿÀ¿³ÿ³  ³ÿ³  ³ÿ³  ³ÿÀÄÙÿ³³ÿ³ ³ÿ³³ÿÀÄÄÄ¿ÚÄ¿',80)||'\n1'
  113. sendstring center('ÀÄÄÄÄÄÙÀÄÄÄÄÄÙÀÄÙ ÀÄÄÙÀÄÙ  ÀÄÙ  ÀÄÙ  ÀÄÄÄÄÄÙÀÄÙ ÀÄÙÀÄÄÄÄÄÙÀÄÙ',80)||'\n1'
  114. sendstring apos(9,20)||'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
  115. sendstring apos(10,20)||'º             º             º             º'
  116. sendstring apos(11,20)||'º             º             º             º'
  117. sendstring apos(12,20)||'º             º             º             º'
  118. sendstring apos(13,20)||'º             º             º             º'
  119. sendstring apos(14,20)||'º             º             º             º'
  120. sendstring apos(15,20)||'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍ͹'
  121. sendstring apos(16,20)||'º             º             º             º'
  122. sendstring apos(17,20)||'º             º             º             º'
  123. sendstring apos(18,20)||'º             º             º             º'
  124. sendstring apos(19,20)||'º             º             º             º'
  125. sendstring apos(20,20)||'º             º             º             º'
  126. sendstring apos(21,20)||'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍͼ'
  127. sendstring apos(11,5)||'\c6WRITTEN BY'
  128. sendstring apos(13,6)||'MORPHEUS'
  129. select
  130. when gametype='1' then;do
  131. typetext='  EXTRA TIME'
  132. getuser 7
  133. lefttext='Time left: '||result||' min.'
  134. end
  135. when gametype='2' then;do
  136. typetext=' EXTRA BYTES'
  137. getuser 42
  138. lefttext='Bytes left: '||result||' credits'
  139. end
  140. when gametype='3' then;do
  141. typetext=' EXTRA FILES'
  142. getuser 43
  143. lefttext='Files left: '||result||' credits'
  144. end
  145. when gametype='4' then typetext='     FUN!'
  146. end
  147. if gametype~='4' then sendstring apos(22,0)||'\c6'||center(lefttext,81)
  148. sendstring apos(11,69)||'\6 PLAY FOR'||apos(13,66)||typetext
  149. sendstring apos(24,5)||'\c4[\c3Q\c4]\c3 = QUIT   \c4[\c3ENTER\c4]\c3 = SCRATCH   \c4[\c3C\c4]\c3 = CHANGE GAME   CURSORKEYS TO SELECT'
  150. return
  151. place_bet:
  152. call check_carrier
  153. select
  154. when gametype='1' then;do forever
  155. sendstring apos(26,26)||'\c6Place your bet \c1[\c60-15 min.\c1]\c6 :\c7 1 '||apos(26,55)
  156. prompt 2
  157. inzet=upper(result)
  158. if inzet='Q' then call exitscratche
  159. if inzet='C' then;do
  160. cg=1
  161. call changegame
  162. return
  163. end
  164. if inzet='' then;do
  165. inzet=1
  166. sendstring apos(26,55)||'\c11'
  167. end
  168. if inzet>=0&inzet<16 then;do
  169. getuser 7
  170. if result>inzet then return
  171. end
  172. end
  173. when gametype='2' then;do forever
  174. sendstring apos(26,23)||'\c6Place your bet \c1[\c60-250 byte cr.\c1]\c6 :\c7 1  '||apos(26,57)
  175. prompt 3
  176. inzet=upper(result)
  177. if inzet='Q' then call exitscratche
  178. if inzet='C' then;do
  179. cg=1
  180. call changegame
  181. return
  182. end
  183. if inzet='' then;do
  184. inzet=1
  185. sendstring apos(26,57)||'\c11'
  186. end
  187. if inzet>=0&inzet<251 then;do
  188. getuser 42
  189. if result>inzet then return
  190. end
  191. end
  192. when gametype='3' then;do forever
  193. sendstring apos(26,24)||'\c6Place your bet \c1[\c60-10 file cr.\c1]\c6 :\c7 1 '||apos(26,57)
  194. prompt 2
  195. inzet=upper(result)
  196. if inzet='Q' then call exitscratche
  197. if inzet='C' then;do
  198. cg=1
  199. call changegame
  200. return
  201. end
  202. if inzet='' then;do
  203. inzet=1
  204. sendstring apos(26,57)||'\c11'
  205. end
  206. if inzet>=0&inzet<11 then;do
  207. getuser 43
  208. if result>inzet then return
  209. end
  210. end
  211. otherwise nop
  212. end
  213. return
  214. get_input:
  215. x=22;y=10
  216. sendstring apos(y,x)||b.1||apos(y+1,x)||b.2||apos(y+2,x)||b.3||apos(y+3,x)||b.4||apos(y+4,x)||b.5
  217. sendstring apos(24,79)
  218. einde=0
  219. chang=0
  220. niets=0
  221. tel=0
  222. do k=1 for 6
  223. vak.k=0
  224. end
  225. k=1
  226. do forever
  227. call check_carrier
  228. getchar
  229. key=result
  230. if key='1B'x then;do
  231. checkio
  232. if result='TRUE' then;do
  233. getchar;getchar
  234. key=result
  235. if key='A' then key='8'
  236. if key='B' then key='2'
  237. if key='C' then key='6'
  238. if key='D' then key='4'
  239. end
  240. else quit=1
  241. end
  242. else if key='D'x|key='5'|key=' ' then key='0'
  243. oldx=x
  244. oldy=y
  245. select
  246. when upper(key)='Q' then quit=1
  247. when upper(key)='C' then;do
  248. call changegame
  249. chang=1
  250. sendstring apos(24,79)
  251. return
  252. end
  253. when key='2'&y<bot then y=y+6
  254. when key='4'&x>left then x=x-14
  255. when key='6'&x<right then x=x+14
  256. when key='8'&y>top then y=y-6
  257. when key='0' then;do
  258. niets=1
  259. i=sym.k
  260. if vak.k=0 then tel=tel+1
  261. vak.k=sym.k
  262. sendstring apos(y+1,x+1)||s.i.1||apos(y+2,x+1)||s.i.2||apos(y+3,x+1)||s.i.3
  263. sendstring apos(24,79)
  264. end
  265. otherwise niets=1
  266. end
  267. oldk=k
  268. select
  269. when x=22&y=10 then k=1
  270. when x=22&y=16 then k=2
  271. when x=36&y=10 then k=3
  272. when x=36&y=16 then k=4
  273. when x=50&y=10 then k=5
  274. when x=50&y=16 then k=6
  275. end
  276. if niets=0&quit=0 then;do
  277. if vak.oldk=0 then
  278. sendstring ''||apos(oldy,oldx)||sp1||apos(oldy+1,oldx)||sp1||apos(oldy+2,oldx)||sp1||apos(oldy+3,oldx)||sp1||apos(oldy+4,oldx)||sp1
  279. else;do
  280. i=vak.oldk
  281. sendstring ''||apos(oldy,oldx)||sp1||apos(oldy+1,oldx)||' '||s.i.1||' '||apos(oldy+2,oldx)||' '||s.i.2||' '||apos(oldy+3,oldx)||' '||s.i.3||' '||apos(oldy+4,oldx)||sp1
  282. end
  283. if vak.k=0 then
  284. sendstring apos(y,x)||b.1||apos(y+1,x)||b.2||sp2||b.2||apos(y+2,x)||b.3||sp2||b.3||apos(y+3,x)||b.4||sp2||b.4||apos(y+4,x)||b.5
  285. else;do
  286. i=vak.k
  287. sendstring apos(y,x)||b.1||apos(y+1,x)||b.2||apos(y+1,x+10)||b.2||apos(y+2,x)||b.3||apos(y+2,x+10)||b.3||apos(y+3,x)||b.4||apos(y+3,x+10)||b.4||apos(y+4,x)||b.5
  288. end
  289. sendstring apos(24,79)
  290. end
  291. else niets=0
  292. if tel=6|quit=1 then return
  293. end
  294. win_or_lose:
  295. if quit=0&chang=0 then;do
  296. i=vak.k
  297. sendstring ''||apos(oldy,oldx)||sp1||apos(oldy+1,oldx)||' '||s.i.1||' '||apos(oldy+2,oldx)||' '||s.i.2||' '||apos(oldy+3,oldx)||' '||s.i.3||' '||apos(oldy+4,oldx)||sp1
  298. call clr(25)
  299. select
  300. when gametype='1' then;do
  301. if win=1 then;do
  302. getuser 7
  303. tijd=result
  304. setobject tijd+(gain*inzet)
  305. putuser 7
  306. sendstring apos(25,26)||'\q1\k1C O N G R A T U L A T I O N S !!!\k0'
  307. sendstring apos(26,23)||'\k1Y O U  H A V E  W O N  '||gain*inzet||'  M I N U T E S\k0'
  308. sendstring apos(27,30)||'\k1  E X T R A  T I M E !!!\k0'
  309. end
  310. else;do
  311. getuser 7
  312. tijd=result
  313. setobject tijd-inzet
  314. putuser 7
  315. if inzet=1 then eenh='  M I N U T E'
  316. else eenh='  M I N U T E S'
  317. sendstring apos(26,19)||'\q1\c7Y O U  H A V E  L O S T  '||inzet||eenh||' !!!'
  318. end
  319. end
  320. when gametype='2' then;do
  321. if win=1 then;do
  322. getuser 42
  323. setobject result+(gain*inzet)
  324. putuser 42
  325. sendstring apos(25,26)||'\q1\k1C O N G R A T U L A T I O N S !!!\k0'
  326. sendstring apos(26,30)||'\k1Y O U  H A V E  W O N  '||gain*inzet||'\k0'
  327. sendstring apos(27,28)||'\k1  B Y T E  C R E D I T S !!!\k0'
  328. end
  329. else;do
  330. getuser 42
  331. setobject result-inzet
  332. putuser 42
  333. if inzet=1 then eenh='  C R E D I T'
  334. else eenh='  C R E D I T S'
  335. sendstring apos(26,15)||'\q1\c7Y O U  H A V E  L O S T  '||inzet||'  B Y T E'||eenh||' !!!'
  336. end
  337. end
  338. when gametype='3' then;do
  339. if win=1 then;do
  340. getuser 43
  341. setobject result+(gain*inzet)
  342. putuser 43
  343. sendstring apos(25,26)||'\q1\k1C O N G R A T U L A T I O N S !!!\k0'
  344. sendstring apos(26,31)||'\k1Y O U  H A V E  W O N  '||gain*inzet||'\k0'
  345. sendstring apos(27,28)||'\k1  F I L E  C R E D I T S !!!\k0'
  346. end
  347. else;do
  348. getuser 43
  349. setobject result-inzet
  350. putuser 43
  351. if inzet=1 then eenh='  C R E D I T'
  352. else eenh='  C R E D I T S'
  353. sendstring apos(26,15)||'\q1\c7Y O U  H A V E  L O S T  '||inzet||'  F I L E'||eenh||' !!!'
  354. end
  355. end
  356. when gametype='4' then;do
  357. if win=1 then;do
  358. sendstring apos(26,26)||'\q1\k1C O N G R A T U L A T I O N S !!!\k0'
  359. sendstring apos(27,30)||'\k1Y O U  H A V E  W O N !!!\k0'
  360. end
  361. else sendstring apos(26,28)||'\q1\c7Y O U  H A V E  L O S T !!!'
  362. end
  363. end
  364. sendstring apos(29,34)||'\c4[\c3 PRESS A KEY \c4]\c0'
  365. call check_carrier
  366. getchar
  367. if upper(result)='Q' then call exitscratche
  368. if upper(result)='C' then call changegame
  369. sendstring '\q1'
  370. end
  371. else if tel>1 then;do
  372. if gametype~='4' then;do
  373. getuser 7
  374. tijd=result
  375. setobject tijd-inzet
  376. putuser 7
  377. end
  378. end
  379. return
  380. changegame:
  381. err=0
  382. do forever
  383. call check_carrier
  384. call clr(25)
  385. sendstring apos(26,14)||'\c6Choose game-type (\c11\c6=Time, \c12\c6=Bytes, \c13\c6=Files, \c14\c6=Fun) : \c1'||apos(26,67)
  386. prompt 1
  387. gametype=upper(result)
  388. select
  389. when gametype='Q' then call exitscratche
  390. when gametype='1' then;do
  391. getuser 7
  392. if result<5 then;do
  393. sendstring apos(27,32)||'\c1Not enough time left!'
  394. err=1
  395. end
  396. else return
  397. end
  398. when gametype='2' then;do
  399. getuser 42
  400. if result<5 then;do
  401. sendstring apos(27,28)||'\c1Not enough byte credits left!'
  402. err=1
  403. end
  404. else return
  405. end
  406. when gametype='3' then;do
  407. getuser 43
  408. if result<5 then;do
  409. sendstring apos(27,28)||'\c1Not enough file credits left!'
  410. err=1
  411. end
  412. else return
  413. end
  414. when gametype='4' then return
  415. otherwise nop
  416. end
  417. if err=1 then;do
  418. sendstring apos(29,34)||'\c4[\c3 PRESS A KEY \c4]\c0'
  419. call check_carrier
  420. getchar
  421. if upper(result)='Q' then call exitscratche
  422. sendstring '\q1'
  423. err=0
  424. end
  425. end
  426. return
  427. exitscratche:
  428. sendstring '\f1\n3\z0\'
  429. getuser 7
  430. stoptijd=result
  431. delta=stoptijd-starttijd
  432. if delta=1| delta=-1 then eenh='minute'
  433. else eenh='minutes'
  434. if delta>=0 then
  435. sendstring '\k1'||center('You have won '||delta||' '||eenh||'!',78)||'\k0\n2'
  436. else sendstring '\c7'||center('You have lost '||-delta||' '||eenh||'!',78)||'\k0\n2'
  437. getuser 42
  438. stopbyte=result
  439. delta=stopbyte-startbyte
  440. if delta=1| delta=-1 then eenh='credit'
  441. else eenh='credits'
  442. if delta>=0 then
  443. sendstring '\k1'||center('You have won '||delta||' byte '||eenh||'!',78)||'\k0\n2'
  444. else sendstring '\c7'||center('You have lost '||-delta||' byte '||eenh||'!',78)||'\k0\n2'
  445. getuser 43
  446. stopfile=result
  447. delta=stopfile-startfile
  448. if delta=1| delta=-1 then eenh='credit'
  449. else eenh='credits'
  450. if delta>=0 then
  451. sendstring '\k1'||center('You have won '||delta||' file '||eenh||'!',78)||'\k0\n3\c3'
  452. else sendstring '\c7'||center('You have lost '||-delta||' file '||eenh||'!',78)||'\k0\n3\c3'
  453. sendstring center('ScratchE! V1.1  by Morpheus',78)||'\c2'
  454. sendstring apos(2,16)'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
  455. sendstring apos(3,16)'º'apos(3,63)'º'apos(4,16)'º'apos(4,63)'º'apos(5,16)'º'apos(5,63)'º'apos(6,16)'º'apos(6,63)'º'apos(7,16)'º'apos(7,63)'º'apos(8,16)'º'apos(8,63)'º'apos(9,16)'º'apos(9,63)'º'
  456. sendstring apos(10,16)'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹'
  457. sendstring apos(11,16)'º'apos(11,63)'º'
  458. sendstring apos(12,16)'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ\c1\n2'
  459. sendstring center('Returning to '||bbsname||'...',78)||'\n1\w3\q1'
  460. setlength maxlines
  461. exit
  462. apos:
  463. return ''arg(1)';'arg(2)'H'
  464. printheader:
  465. sendstring '\f1\@6\c6'
  466. sendstring center('ÛßßßßßÛ ÛßßßßßÛ ÛßßßßßßÛ ÛßßßßßßÛ ÛßßßßßÛ ÛßßßßßÛ ÛßÛ ÛßÛ ÛßßßßßÛ ÛßÛ',80)||'\n1'
  467. sendstring center('Û Ûßßßß Û ÛßÛ Û Û ÛßßÛ Û Û ÛßßÛ Û ßßÛ Ûßß Û ÛßÛ Û Û Û Û Û Û Ûßßßß Û Û',80)||'\n1'
  468. sendstring center('Û ßßßßÛ Û Û ßßß Û ßßßß Û Û ßßßß Û   Û Û   Û Û ßßß Û ßßß Û Û ßßÛ   Û Û',80)||'\n1'
  469. sendstring center('ßßßßÛ Û Û Û ÛßÛ Û ÛßÛ Ûß Û ÛßßÛ Û   Û Û   Û Û ÛßÛ Û ÛßÛ Û Û Ûßß   ßßß',80)||'\n1'
  470. sendstring center('Ûßßßß Û Û ßßß Û Û Û Û ßÛ Û Û  Û Û   Û Û   Û ßßß Û Û Û Û Û Û ßßßßÛ ÛßÛ',80)||'\n1'
  471. sendstring center('ßßßßßßß ßßßßßßß ßßß ßßßß ßßß  ßßß   ßßß   ßßßßßßß ßßß ßßß ßßßßßßß ßßß',80)||'\n1'
  472. sendstring apos(7,23)||'\c4-=> \c3ScratchE! V1.1  by Morpheus \c4<=-'
  473. return
  474. instr:
  475. call printheader
  476. sendstring '\n2\c3  ScratchE! is a very simple doorgame especially written for Excelsior! BBS.\n1'
  477. sendstring '  The  aim  of  the game is to find at least three equal symbols/numbers in a\n1'
  478. sendstring '  six-field scratch-ticket.\n2'
  479. sendstring '  There are four different game-types:\n2'
  480. sendstring '        \c41)\c3  Time  - Play for extra time\n1'
  481. sendstring '        \c42)\c3  Bytes - Play for extra download bytes\n1'
  482. sendstring '        \c43)\c3  Files - Play for extra download files\n1'
  483. sendstring '        \c44)\c3  Fun   - Play for fun !!!\n2'
  484. sendstring '  At the start of each game of the first 3 game-types you re asked to place a\n1'
  485. sendstring '  bet.  If you  lose the  game then  the stake will  be subtracted  from your\n1'
  486. sendstring '  balance.  If you  win the game then '||gain||' times the stake will be added to your\n1'
  487. sendstring '  balance.\n1'
  488. sendstring '  If you quit the game with more than one field scratched open, you''ll lose!\n1'
  489. return
  490. rnd:
  491. return (random(1,100,time(s))+random(1,100,time(s))+random(1,100,time(s)))//arg(1)
  492. clr:
  493. sendstring ''arg(1)'H'
  494. return
  495. check_carrier:
  496. getcarrier
  497. if result='FALSE' then exit
  498. return